import { expect, test } from "bun:test";
import * as http2 from "http2";

test("Http2Server.setTimeout returns server instance for method chaining", () => {
  const server = http2.createServer();

  try {
    const result = server.setTimeout(1000);
    expect(result).toBe(server);
  } finally {
    server.close();
  }
});

test("Http2Server.setTimeout with callback returns server instance", () => {
  const server = http2.createServer();
  const callback = () => {};

  try {
    const result = server.setTimeout(1000, callback);
    expect(result).toBe(server);
  } finally {
    server.close();
  }
});

test("Http2Server.setTimeout allows method chaining with close", () => {
  const server = http2.createServer();

  // This should not throw - chaining should work
  expect(() => {
    server.setTimeout(1000).close();
  }).not.toThrow();
});

test("Http2SecureServer.setTimeout returns server instance for method chaining", () => {
  const server = http2.createSecureServer({
    key: "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC7VJTUt9Us8cKj\nMzEfYyjiWA4R4/M2bS1+fWIcPm15A8+raZ4dp+/PJE0NOsmuurvzNCS138P6AqQ0\njdsEYDbPszN+X9XYqXqYfKmSBGbGwPqaqCGhqtRaKNl1s1x5dn/7CJPxr/vHNQXL\nJZ+kP1Mb9FsMqmHbYJFuJB/T8fJuMJRKqY7J1W3J+cVvvvQy2eJXqZqVj1/lXZXR\nUH0WqWdQnfnPj3Lh6qKm8Cf8qh3Uug2o3GWG0UE6YwLqNfBCULrOeRLtCqkbMdHb\nF7XvL0kHNvf3eFiVZ8cJ/KcIVIEhiqOQkZj3qMRqGqEP0H9dqYHK1Dj5cLxqxXCL\nLKxKP0SZAgMBAAECggEAZj3P3V3fKKvqZgPpzLQrjwHpBKZOhRWTR+zQfAVqN7rW\nc3MrdOzP7cVLN7CYsPZF7JpXY5/hYvjOXPQr5tqKJZ/+T5hYJ4CUYhJbMlxL0pIR\njXNLJFVz3ZQJNmWAe3h3H0TpE7oZcYR7nHVWKZ4I3WxX1TxT3a8QN6BXGCbJwYEk\n5QI4SLFiV3f3Hh0xQZPPfZGP/M3EVGfEOxZWqkZxkDCj5F9DH+r0J2V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MRqGqEP0H9dqYHK1Dj5cLxqxXCLLKxKP0SZAgMBAAGjUzBRMB0GA1Ud\nDgQWBBQQXqYYXq7XqYq7q7q7q7q7q7q7qzAfBgNVHSMEGDAWgBQQXqYYXq7XqYq7\nq7q7q7q7q7q7qzAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQC7\nVJTUt9Us8cKjMzEfYyjiWA4R4/M2bS1+fWIcPm15A8+raZ4dp+/PJE0NOsmuurvz\nNCS138P6AqQ0jdsEYDbPszN+X9XYqXqYfKmSBGbGwPqaqCGhqtRaKNl1s1x5dn/7\nCJPxr/vHNQXLJZ+kP1Mb9FsMqmHbYJFuJB/T8fJuMJRKqY7J1W3J+cVvvvQy2eJX\nqZqVj1/lXZXRUH0WqWdQnfnPj3Lh6qKm8Cf8qh3Uug2o3GWG0UE6YwLqNfBCULrO\neRLtCqkbMdHbF7XvL0kHNvf3eFiVZ8cJ/KcIVIEhiqOQkZj3qMRqGqEP0H9dqYHK\n1Dj5cLxqxXCLLKxKP0SZ\n-----END CERTIFICATE-----",
  });

  try {
    const result = server.setTimeout(1000);
    expect(result).toBe(server);
  } finally {
    server.close();
  }
});

test("Http2SecureServer.setTimeout with callback returns server instance", () => {
  const server = http2.createSecureServer({
    key: "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC7VJTUt9Us8cKj\nMzEfYyjiWA4R4/M2bS1+fWIcPm15A8+raZ4dp+/PJE0NOsmuurvzNCS138P6AqQ0\njdsEYDbPszN+X9XYqXqYfKmSBGbGwPqaqCGhqtRaKNl1s1x5dn/7CJPxr/vHNQXL\nJZ+kP1Mb9FsMqmHbYJFuJB/T8fJuMJRKqY7J1W3J+cVvvvQy2eJXqZqVj1/lXZXR\nUH0WqWdQnfnPj3Lh6qKm8Cf8qh3Uug2o3GWG0UE6YwLqNfBCULrOeRLtCqkbMdHb\nF7XvL0kHNvf3eFiVZ8c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KjMzEfYyjiWA4R4/M2bS1+fWIcPm15\nA8+raZ4dp+/PJE0NOsmuurvzNCS138P6AqQ0jdsEYDbPszN+X9XYqXqYfKmSBGbG\nwPqaqCGhqtRaKNl1s1x5dn/7CJPxr/vHNQXLJZ+kP1Mb9FsMqmHbYJFuJB/T8fJu\nMJRKqY7J1W3J+cVvvvQy2eJXqZqVj1/lXZXRUH0WqWdQnfnPj3Lh6qKm8Cf8qh3U\nug2o3GWG0UE6YwLqNfBCULrOeRLtCqkbMdHbF7XvL0kHNvf3eFiVZ8cJ/KcIVIEh\niqOQkZj3qMRqGqEP0H9dqYHK1Dj5cLxqxXCLLKxKP0SZAgMBAAGjUzBRMB0GA1Ud\nDgQWBBQQXqYYXq7XqYq7q7q7q7q7q7q7qzAfBgNVHSMEGDAWgBQQXqYYXq7XqYq7\nq7q7q7q7q7q7qzAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQC7\nVJTUt9Us8cKjMzEfYyjiWA4R4/M2bS1+fWIcPm15A8+raZ4dp+/PJE0NOsmuurvz\nNCS138P6AqQ0jdsEYDbPszN+X9XYqXqYfKmSBGbGwPqaqCGhqtRaKNl1s1x5dn/7\nCJPxr/vHNQXLJZ+kP1Mb9FsMqmHbYJFuJB/T8fJuMJRKqY7J1W3J+cVvvvQy2eJX\nqZqVj1/lXZXRUH0WqWdQnfnPj3Lh6qKm8Cf8qh3Uug2o3GWG0UE6YwLqNfBCULrO\neRLtCqkbMdHbF7XvL0kHNvf3eFiVZ8cJ/KcIVIEhiqOQkZj3qMRqGqEP0H9dqYHK\n1Dj5cLxqxXCLLKxKP0SZ\n-----END CERTIFICATE-----",
  });
  const callback = () => {};

  try {
    const result = server.setTimeout(1000, callback);
    expect(result).toBe(server);
  } finally {
    server.close();
  }
});

test("Http2SecureServer.setTimeout allows method chaining with close", () => {
  const server = http2.createSecureServer({
    key: "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFA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